package while语句;

import java.sql.SQLOutput;

public class 循环语句 {
    //实现1+2+3+4+5
    public static void main(String[] args) {
        int sum=0;
         for(int num=1;num<=5;num++)
        {
            sum+=num;
        }
        System.out.println(sum);
    }

}
